home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fritz: All Fritz
/
All Fritz.zip
/
All Fritz
/
FILES
/
PROGSCAL
/
VPASCAL.LZH
/
WEATHER
< prev
next >
Wrap
Text File
|
1985-08-08
|
640b
|
28 lines
PROGRAM WEATHER; {ask and respond to questions}
VAR
WEEKDAY,RAINY:BOOLEAN;
FUNCTION YES : BOOLEAN;
VAR
CH:CHAR;
S:STRING;
BEGIN
READLN(S);
CH := S[1];
IF (CH = 'Y') OR (CH = 'y') THEN YES := TRUE
ELSE YES := FALSE;
END;
BEGIN {----------------------------------------------------------}
CLS;
WRITE('IS TODAY A WEEKDAY? ');
WEEKDAY := YES;
WRITE('IS IT RAINING? ');
RAINY := YES;
IF WEEKDAY THEN
IF RAINY THEN WRITELN('DRIVE TO WORK.') ELSE WRITELN('WALK TO WORK.');
IF NOT WEEKDAY THEN
IF RAINY THEN WRITELN('GO TO MUSEUM.') ELSE WRITELN('PLAY TENNIS!');
END.